package com.smh.demo1.a12;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author shiminghui
 * @date 2025/4/16 18:18
 * @description: TODO
 */
@Aspect
@Component
public class MyAspect {

    private final static Logger log = LoggerFactory.getLogger(MyAspect.class);

    @Before("execution(* com.smh.demo1.a12.Target.*(..))")
    public void before() {
        log.info("aop代理的 before 方法执行");
    }

    @After("execution(* com.smh.demo1.a12.Target.*(..))")
    public void after() {
        log.info("aop代理的 after 方法执行");
    }
}
